﻿using Microsoft.EntityFrameworkCore;
using MyModule.Breeding;
using MyModule.ManageSheep;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace MyModule.EntityFrameworkCore;

[ConnectionStringName(MyModuleDbProperties.ConnectionStringName)]
public class MyModuleDbContext : AbpDbContext<MyModuleDbContext>, IMyModuleDbContext
{
    /* Add DbSet for each Aggregate Root here. Example:
     * public DbSet<Question> Questions { get; set; }
     */

    public DbSet<WeighInfo> weighInfos { get; set; }
    public DbSet<WeighType> weighTypes { get; set; }
    public DbSet<BodySize> bodySizes { get; set; }
    public DbSet<Appearance> appearances { get; set; }
    public DbSet<DeathInfo> deathInfos { get; set; }
    public DbSet<Eliminate> eliminates { get; set; }
    public DbSet<CauseInfo> causeInfos { get; set; }
    public DbSet<VarietyInfo> varietyInfos { get; set; }
    public DbSet<Dreproduction> dreproductions { get; set; }
    public DbSet<EliminateCause> eliminateCauses { get; set; }


    public MyModuleDbContext(DbContextOptions<MyModuleDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureMyModule();
    }
}
